import request from '@/config/axios'

// 假期类型标准 VO
export interface HolidayStandardsVO {
  id: number // 序号
  title: string // 假期标题
  days: number // 天数
  remark: string // 备注
}

// 假期类型标准 API
export const HolidayStandardsApi = {
  // 查询假期类型标准分页
  getHolidayStandardsPage: async (params: any) => {
    return await request.get({ url: `/oa/holiday-standards/page`, params })
  },

  

  // 查询假期类型标准详情
  getHolidayStandards: async (id: number) => {
    return await request.get({ url: `/oa/holiday-standards/get?id=` + id })
  },

  // 新增假期类型标准
  createHolidayStandards: async (data: HolidayStandardsVO) => {
    return await request.post({ url: `/oa/holiday-standards/create`, data })
  },

  // 修改假期类型标准
  updateHolidayStandards: async (data: HolidayStandardsVO) => {
    return await request.put({ url: `/oa/holiday-standards/update`, data })
  },

  // 删除假期类型标准
  deleteHolidayStandards: async (id: number) => {
    return await request.delete({ url: `/oa/holiday-standards/delete?id=` + id })
  },

  // 导出假期类型标准 Excel
  exportHolidayStandards: async (params) => {
    return await request.download({ url: `/oa/holiday-standards/export-excel`, params })
  },
}
